package com.example.helloworld;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author 张岩
 * @date 2022/3/22 10:37
 */
@Controller
public class HelloThymeleafController {


	@RequestMapping("/helloThymeleaf")
	public String hello(Map<String, Object> map) {
		//通过 map 向前台页面传递数据
		map.put("name", "编程帮（www.biancheng.net）");
		return "hello";
	}

	@RequestMapping("/loginThymeleaf")
	public String login(Map<String, Object> map) {
		//通过 map 向前台页面传递数据
		map.put("msg", "提示信息");
		return "login";
	}

}
